package com.stock.job;


import com.stock.service.StockTimerTaskService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class StockJob {

    @Autowired
    private StockTimerTaskService stockTimerTaskService;


    /**
     * 定时采集A股大盘数据
     */
    @XxlJob("getInnerMarketInfo")
    public void getInnerMarketInfo(){
        stockTimerTaskService.getInnerMarketInfo();
    }

    /**
     * 定时采集A股个股数据
     */
    @XxlJob("getStockRtInfos")
    public void getStockRtInfos(){
        stockTimerTaskService.getStockRtIndex();
    }

    /**
     * 定时采集A股板块数据
     */
    @XxlJob("getStockBlockRtInfo")
    public void getStockBlockRtInfo(){
        stockTimerTaskService.getStockBlockRtInfo();
    }
}
